﻿using Avalonia.Media;

namespace GraphShape.Controls.Converters
{
    public abstract class EdgeConverterBase
    {
        public static double GetLength(aPoint point) => Math.Sqrt(point.X * point.X + point.Y * point.Y);
        
        public static PathSegments GetSegments(IEnumerable<PathSegment> segments)
        {
            var ps = new PathSegments();
            
            foreach (var segment in segments)
            {
                ps.Add(segment);
            }

            return ps;
        }
    }
}